home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume24 / psroff3.0 / part08 < prev    next >
Encoding:
Internet Message Format  |  1991-10-09  |  55.7 KB

  1. Subject:  v24i103:  psroff, Troff to PostScript filter, Part08/19
  2. Newsgroups: comp.sources.unix
  3. Approved: rsalz@uunet.UU.NET
  4.  
  5. Submitted-by: Chris Lewis <clewis@ferret.ocunix.on.ca>
  6. Posting-number: Volume 24, Issue 103
  7. Archive-name: psroff3.o/part08
  8.  
  9. #! /bin/sh
  10. # This is a shell archive.  Remove anything before this line, then feed it
  11. # into a shell via "sh file" or similar.  To overwrite existing files,
  12. # type "sh file -c".
  13. # The tool that generated this appeared in the comp.sources.unix newsgroup;
  14. # send mail to comp-sources-unix@uunet.uu.net if you want that tool.
  15. # Contents:  INSTALL audit.S fonts.lj/S.20.pk.UU lib/lj.fonts
  16. #   lib/ps.lib
  17. # Wrapped by clewis@ecicrl on Fri Apr  5 20:56:00 1991
  18. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  19. echo If this archive is complete, you will see the following message:
  20. echo '          "shar: End of archive 8 (of 19)."'
  21. if test -f 'INSTALL' -a "${1}" != "-c" ; then 
  22.   echo shar: Will not clobber existing file \"'INSTALL'\"
  23. else
  24.   echo shar: Extracting \"'INSTALL'\" \(11587 characters\)
  25.   sed "s/^X//" >'INSTALL' <<'END_OF_FILE'
  26. X        Psroff 3.0 Installation Instructions
  27. X            2.12 91/04/02
  28. X
  29. XPlease see the TROUBLE file if you have difficulties.
  30. XThe README file does provide a bit more background on some
  31. Xof these issues.  If you are installing for use with real
  32. Xditroff, you'll also want to consult the DITROFF file during
  33. Xinstallation.  After building and installing psroff, you
  34. Xwill want to read the MISC file for further tuning.
  35. X
  36. XI suggest you print this file and read it while you work through
  37. Xyour configuration.
  38. X
  39. X    - Files that you will have to edit for proper configuration
  40. X      of psroff:
  41. X
  42. X        defs.h
  43. X        Makefile
  44. X        lib/psrofflib.S
  45. X
  46. X      Important note: as shipped, both defs.h and Makefile are
  47. X      configured for RS/6000 and most (if not all) stock System V's
  48. X      with the exception of MANDIR and MANEXT in Makefile.
  49. X      psrofflib.S MUST be changed for each system in the field.
  50. X
  51. X    - Other files that may need to be customized for your needs:
  52. X
  53. X        lib/*.lib
  54. X        lib/*.fonts
  55. X
  56. X      If you have to alter any other files, please contact me and
  57. X      tell me where I've goofed.
  58. X
  59. X    - If you have problems with the makefiles, you'll have to
  60. X      find a System 5 make.  Many systems have them squirrelled
  61. X      away in odd places.  Eg: Ultrix: /usr/bin/s5make
  62. X
  63. X      If you have to do this, this should probably make things
  64. X      work:
  65. X        MAKE=<your System V make> export MAKE
  66. X        <your System V make> <make arguments>
  67. X      Eg:
  68. X        MAKE=/usr/bin/s5make export MAKE
  69. X        $(MAKE)
  70. X
  71. X    - If you're building for ditroff input only, ignore the discussions
  72. X      on HEADERSIZE and trofftype.
  73. X
  74. X    - Ditroff input only: copy the appropriate
  75. X      font width tables (try widthps/[A-Z]* for testing) to
  76. X      /usr/lib/font/dev<type> and run makedev or mkfont on them.
  77. X
  78. X    - NOTE: You may wish to try running "make check" at this
  79. X      point, it should be able to find out the correct "HEADERSIZE"
  80. X      and "trofftype" setting so you don't have to guess later on.
  81. X      In any event, if you have problems and wish to ask me for help,
  82. X      I will be requiring that you mail me a copy of the first
  83. X      50 lines or so of "make check" output.
  84. X
  85. X      If you're running on RISC Ultrix ignore any HEADERSIZE or
  86. X      trofftype messages.  The reason for this is that RISC
  87. X      Ultrix comes with width tables that cannot be read
  88. X      by the RISC Ultrix troff, and make check will be fooled.
  89. X      Define ASCIIWIDTHS in defs.h in this case.  trofftype
  90. X      in psrofflib should be the -F variant in this case.
  91. X
  92. X      Psroff builds width table files that *can* be used by
  93. X      RISC/Ultrix troff.  You can tell if you need ASCIIWIDTHS
  94. X      defined if:
  95. X        echo ".fp 1 R" | troff -t > /dev/null
  96. X      says something nasty about non-numeric character in file,
  97. X      "may be non-ASCII".
  98. X
  99. X      Apollos need the -F trofftype variant.  Their HEADERSIZE
  100. X      calculation is strange.  You should set HEADERSIZE
  101. X      to 0, and proceed with these instructions, but do NOT
  102. X      install psroff.  Once you've built psroff, consult
  103. X      the TROUBLE file on how to run "dumpft -gv", which
  104. X      will tell you what your HEADERSIZE should be, then you
  105. X      should rebuild, test and install.
  106. X
  107. X      The dumpft -gv trick will actually work on most systems
  108. X      (except RISC/Ultrix), but it requires you to rebuild psroff
  109. X      twice...
  110. X
  111. X    - NOTE: during installs as root, the makefiles attempt to be
  112. X      careful about the modes of the files it creates.  HOWEVER,
  113. X      some people do insist on "umask 077" for root, and I've
  114. X      probably not fixed everything.  If psroff doesn't work
  115. X      after an install, I suggest that you check root's umask,
  116. X      and ensure that it's 002 or 022 before invoking any
  117. X      of the makefile install entries.  If you forget, you
  118. X      can invoke:
  119. X        make fixperms
  120. X      on the upper level makefile.
  121. X
  122. X    - type "make unpackljfonts"  This will uudecode the font
  123. X      files I've supplied and remove the .UU files.  This
  124. X      step is unneccessary if you're not using Laserjets,
  125. X      but it will regain you some space.
  126. X
  127. X    - take a copy of the Makefile, defs.h and lib/psrofflib.S and
  128. X      squirrel them away somewhere.  I'm not going to produce
  129. X      patch-independent configurators, so if a patch has to come
  130. X      out, they may well zap these three files.  If so, you'll
  131. X      have to fix them manually.  Other files (lib/*.fonts and
  132. X      lib/*.lib) are field-configurable, and it is possible I
  133. X      will patch a few of them later (particularly lj.fonts).
  134. X
  135. X    - If you are using the supplied width tables (widths/widthps),
  136. X      all is fine.  But, if you're going to be driving another
  137. X      package (eg: jetroff, tpscript, psdit, xtroff etc.) I suggest
  138. X      you find the ditroff-format ASCII width tables (DESC, R, I,
  139. X      S etc.), copy them to the appropriate widths/width<xx> area,
  140. X      modify psrofflib.S to know how to use these width tables,
  141. X      and possibly create *.fonts and *.lib files.  psrofflib.S
  142. X      has copious comments on how to configure psroff.
  143. X
  144. X      psdit, tpscript, xtroff, Pageview, Display Postscript and
  145. X      xproof work reasonably well using the Postscript widths in
  146. X      widthps.
  147. X
  148. X    - edit Makefile and change whatever you need to.
  149. X
  150. X    - edit defs.h and define either BSD or ATT.  A few other options will
  151. X      pertain to you.  Take special note of HEADERSIZE.  Take a look
  152. X      at /usr/lib/font/ftR.  Is it 224 bytes long?  If so, HEADERSIZE
  153. X      should be 0.  Otherwise you will probably have to set it to the
  154. X      size of your a.out.h structure.  VAX Ultrix and Sun appear to always
  155. X      be HEADERSIZE = 32.  See remark about RISC Ultrix above.  If you're
  156. X      Apollo, see remark above, plus info in TROUBLE file about Apollos.
  157. X
  158. X      With Laserjet driving:
  159. X
  160. X        MDLF    max # downloaded fonts supported per page.
  161. X            LJ+ have this as 16.  Later models support more.
  162. X        PRELOAD    # fonts statically downloaded.
  163. X        SFP        enables SFP's with incremental font downloading.
  164. X            Needs INCR.
  165. X        INCR    enable incremental font downloading.  Needs PARTIAL.
  166. X        PARTIAL    enable partial font downloading (only those characters
  167. X            troff could possibly use are downloaded).  Needs PK.
  168. X        PK        enables PK font handling.  If PK is off, the only
  169. X            downloading supported is "cat <sfpfile>".
  170. X        COMPRESS    permits you to compress SFP files.
  171. X
  172. X        Why all this config?  Well, when INCR is defined up to 16 fonts
  173. X        could be incore at any given moment, which can chew up a lot
  174. X        of space (especially with large pointsize SFP's).  I very
  175. X        much doubt that you can use INCR on a 64K address space machine.
  176. X        (or even split I&D!)  But you really *do* want to use INCR,
  177. X        otherwise you might blow the Laserjet's memory, and use of INCR
  178. X        *dramatically* decreases the transmission time to the printer.
  179. X
  180. X        If INCR not defined, at most only one font will be in core.
  181. X
  182. X        If PARTIAL is defined, only those characters that troff *could*
  183. X        use (remember ROMAN8 and MATH8 fonts have 192 characters each,
  184. X        but R and S have less than 108 each) are loaded into memory,
  185. X        and only they are downloaded to the Laserjet.  This cuts down
  186. X        the amount of laserjet memory used for fonts by about half,
  187. X        and also cuts down transmission time.
  188. X
  189. X        If PARTIAL is undefined, whole PK or SFPs are downloaded.
  190. X        if PK is undefined, only whole SFP's are downloaded.  And this
  191. X        drops out the font handling machinery completely.  Actually,
  192. X        on LJIII's this isn't such a bad idea unless you intend on
  193. X        using more than the built-in scaleable fonts.
  194. X
  195. X        Certain HPLJ clones will apparently not work with incremental
  196. X        downloading.  If your printer screws up, undef INCR, but
  197. X        make sure you have PARTIAL turned on and try again.
  198. X
  199. X    - edit lib/psrofflib.S according to the instructions you find.
  200. X      Take special note of -T/-F handling for troff (trofftype) -
  201. X      check out your troff manual page!  Suns and Ultrix want
  202. X      trofftype='-F/usr/lib/font/$width/ftXX'.  If you're running
  203. X      postscript, you may want to eventually add the -Z option
  204. X      to the entry to make your printer REALLY run fast.
  205. X
  206. X    - If you're going to be driving HP Laserjets without a Postscript
  207. X      cartridge:
  208. X
  209. X      If you have PK fonts from TeX, ensure that PKFONTS
  210. X      is set reasonably in the Makefile.  type:
  211. X
  212. X        make buildljfonts
  213. X
  214. X      This will generate under $NEWFONTS a whole pile of
  215. X      SFP's (PK's if SFP2PK is set to a good sfp2pk program,
  216. X      such as Rick Richardson's jetroff utility).  It will
  217. X      also generate a $NEWFONTS/lj.fonts.new whose entries
  218. X      should be *merged* (not copied) with lib/lj.fonts.
  219. X      buildljfonts will generate a fair number of things,
  220. X      so you may have to fix your Makefile/defs.h configuration.
  221. X      Caution: if you have a lot of PK's, this will use up a LOT
  222. X      of space - 5000 blocks or more!
  223. X
  224. X      See LASERFONTS file for further information.
  225. X
  226. X    - if you're going to be driving HP Laserjets, type:
  227. X
  228. X        su root
  229. X        make installljfonts
  230. X
  231. X      This will attempt to copy the fonts I've supplied plus
  232. X      any created in the previous step to the $LJF directory.
  233. X
  234. X    - Type
  235. X        make check
  236. X
  237. X      This will attempt to figure out whether you got some of the
  238. X      more important options correct (trofftype & HEADERSIZE).
  239. X
  240. X    - Type
  241. X
  242. X        make
  243. X
  244. X      This will build everything (including width tables for any
  245. X      HPLJ fonts you have supplied).
  246. X
  247. X    - If you want to test psroff without actually installing it,
  248. X      you will have to install the width tables (because troff's
  249. X      limited as to where it will look for the width tables).
  250. X      As root,
  251. X
  252. X        make installwidths
  253. X
  254. X      Will install the widths as FONTDIR/ps/ftXX (which shouldn't
  255. X      conflict with anything you already have, and you'll be
  256. X      able to run "make test" without doing the "make install" first.
  257. X      Actually, psroff will work without this being done, but it
  258. X      will use the width tables that came with your troff, so the
  259. X      output will look a little odd (along with giving you a warning
  260. X      to that effect).
  261. X
  262. X    - Final installation:
  263. X      As root,
  264. X        make install
  265. X        make installwidths
  266. X      Will install everything.
  267. X
  268. X    - "make test" will print a test page.  If you have problems,
  269. X      please run "make test", fill in the blanks, and mail me the
  270. X      result.  (See the README for the address).  The test page
  271. X      exercises all R & S troff characters at 10 point, and displays
  272. X      a few other characters at different point sizes.  If you don't
  273. X      want to run psroff itself (eg: you've got troff2ps in a printer
  274. X      daemon), type:
  275. X
  276. X        make TEST
  277. X        tbl TEST | troff -t -T<whatever> | <troff2ps server>
  278. X
  279. X      "<troff2ps server>" may be "troff2ps -T<whatever> | your printer".
  280. X      [The -T<whatever> would be replaced with -F/usr/lib/font/<whatever>/ftXX
  281. X      if you are a -F type of troff (Suns, Ultrix etc.)]
  282. X
  283. X      "TEST" is generated via make to include some information about
  284. X      your configuration to help me diagnose your problems.
  285. X
  286. X      If you're running on Laserjets, and you're just using my
  287. X      fonts, you'll notice that the lines supposed to be 16 point
  288. X      won't be, and the "6" will be missing in italic and bold.
  289. X      Get some decent fonts.
  290. X
  291. X      For ditroff input, "make dittest" and "make DITTEST" correspond
  292. X      to "make test" and "make TEST".
  293. X
  294. X      Once you've printed the test sheet, if there seems to be any problems,
  295. X      consult the "TEST SHEET ANALYSIS" section of the TROUBLE files.
  296. X
  297. X    - If you're running Postscript and you want to use n-up printing
  298. X      (see psxlate(1)), you should obtain the psnup distribution
  299. X      from comp.sources.misc.  After building psnup, copy the
  300. X      nup.pro and nup.epi files to LIBDIR.
  301. X
  302. X    - If you're running Display Postscript, via the "dpsexec"
  303. X      program, you may want to apply the patch mentioned in
  304. X      MISC.
  305. X
  306. X    - If you have problems, read the TROUBLE file which describes
  307. X      some trouble-shooting.
  308. X
  309. X    - At this point (presuming that you've successfully built, tested
  310. X      and installed everything), you might want to consult the MISC
  311. X      file for further customization.
  312. END_OF_FILE
  313.   if test 11587 -ne `wc -c <'INSTALL'`; then
  314.     echo shar: \"'INSTALL'\" unpacked with wrong size!
  315.   fi
  316.   # end of 'INSTALL'
  317. fi
  318. if test -f 'audit.S' -a "${1}" != "-c" ; then 
  319.   echo shar: Will not clobber existing file \"'audit.S'\"
  320. else
  321.   echo shar: Extracting \"'audit.S'\" \(12941 characters\)
  322.   sed "s/^X//" >'audit.S' <<'END_OF_FILE'
  323. X%%STARTSHELL%%
  324. X#    Copyright 1985, 1986, 1987, 1988, 1989, 1990, 1991 Chris Lewis
  325. X#        All Rights Reserved
  326. X#
  327. X#    See the LICENSE file for a full description of the restrictions
  328. X#    under which this software is provided.
  329. X#
  330. X#
  331. X#    Psroff checking script 2.9 91/03/26
  332. Xchkinst=false
  333. Xfor i
  334. Xdo
  335. X    case $i in
  336. X    install)
  337. X        chkinst=true
  338. X        ;;
  339. X    *)
  340. X        printerlist="$printerlist $i"
  341. X        ;;
  342. X    esac
  343. Xdone
  344. Xeval "`sed -n -e 's/[()]//g' \
  345. X          -e 's/^LIBDIR.*=[     ]*/LIBDIR=/p' \
  346. X          -e 's/^LJF.*=[     ]*/LJF=/p' \
  347. X          -e 's/^FONTDIR.*=[     ]*/FONTDIR=/p' \
  348. X         Makefile`"
  349. Xecho "LIBDIR  = $LIBDIR"
  350. Xecho "LJF     = $LJF"
  351. Xecho "FONTDIR = $FONTDIR"
  352. Xif [ -z "$FONTDIR" ]
  353. Xthen
  354. X    echo "ERROR: That's odd, can't find a FONTDIR setting in Makefile"
  355. Xelif [ ! -d $FONTDIR ]
  356. Xthen
  357. X    echo "ERROR: That's really odd, no such directory $FONTDIR"
  358. X    echo "       This is where CAT's width tables are supposed to be"
  359. X    echo "       It is usually /usr/lib/font"
  360. X    FONTDIR=
  361. Xfi
  362. Xif [ -z "$LIBDIR" ]
  363. Xthen
  364. X    echo "ERROR: Bad configuration - no LIBDIR setting"
  365. X    exit 1
  366. Xelif [ ! -d $LIBDIR ]
  367. Xthen
  368. X    echo "INFO: You've not installed psroff yet - no LIBDIR ($LIBDIR) exists"
  369. X    if $chkinst
  370. X    then
  371. X    echo "ERROR: Can't check installed version unless it's installed"
  372. X    exit 1
  373. X    fi
  374. Xfi
  375. X
  376. Xif $chkinst
  377. Xthen
  378. X    psrofflib=$LIBDIR/lib/psrofflib
  379. X    libbase=$LIBDIR/lib
  380. Xelse
  381. X    psrofflib=lib/psrofflib
  382. X    libbase=lib
  383. Xfi
  384. Xif grep 'define.*ASCIIWIDTHS' defs.h > /dev/null 2>&1
  385. Xthen
  386. X    cat <<\!
  387. XI see you've defined ASCIIWIDTHS.  This means that your trofftype
  388. Xshould be the -F variant.  Please ignore the rest of the checking
  389. Xfor trofftype and HEADERSIZE.
  390. X!
  391. Xfi
  392. X
  393. Xif [ ! -r $psrofflib ]
  394. Xthen
  395. X    echo "ERROR: no $psrofflib to check"
  396. X    exit 1
  397. Xfi
  398. X
  399. Xeval `grep '^troff=' $psrofflib`
  400. Xecho "INFO: Your troff setting in psrofflib is troff=$troff"
  401. Xif [ -n "$troff" ]
  402. Xthen
  403. X    # This should be -x, but Ultrix sh doesn't believe in it
  404. X    if [ ! -f $troff ]
  405. X    then
  406. X    echo "ERROR: troff setting in $psrofflib ($troff) doesn't exist"
  407. X    troff=
  408. X    fi
  409. Xelse
  410. X    mpath=`echo $PATH | sed -e 's/^:/.:/' -e 's/:$/:./' -e 's/:/ /g'`
  411. X    echo "INFO: Your path is $mpath"
  412. X    for i in $mpath
  413. X    do
  414. X    if [ -f $i/troff ]
  415. X    then
  416. X        echo "INFO: Troff appears to be $i/troff"
  417. X        troff=$i/troff
  418. X        break
  419. X    fi
  420. X    done
  421. X    if [ -z "$troff" ]
  422. X    then
  423. X    echo "ERROR: Can't find troff!"
  424. X    exit 1
  425. X    fi
  426. Xfi
  427. X
  428. Xeval `grep '^trofftype=' $psrofflib`
  429. Xecho "INFO: Your trofftype setting in $psrofflib is trofftype='$trofftype'"
  430. X
  431. Xif [ ! -r $FONTDIR/ftR -o ! -r $FONTDIR/ftI -o ! -r $FONTDIR/ftB -o \
  432. X    ! -r $FONTDIR/ftS ]
  433. Xthen
  434. Xcat <<!
  435. XWARNING: Missing one of the $FONTDIR/ft[RIBS] files.
  436. X    I was hoping that FONTDIR was pointing at the place where
  437. X    your version of troff keeps its width tables (by default
  438. X    /usr/lib/font).  Since this is not true, I will not be able
  439. X    to tell with complete accuracy whether your trofftype setting
  440. X    works.  Therefore, take any ERROR messages about trofftype with
  441. X    a grain of salt.  You could always copy widths/widthps/ft[RIBS]
  442. X    (after make widths) into $FONTDIR, but, I NEED a ftR from
  443. X    your ORIGINAL troff distribution to test HEADERSIZE properly.
  444. X!
  445. Xfi
  446. X
  447. Xif [ -n "$FONTDIR" ]
  448. Xthen
  449. X    arglist="-F$FONTDIR/./ftXX"
  450. Xfi
  451. X
  452. Xecho hello | $troff > /tmp/out$$ 2> /tmp/err$$
  453. Xif [ -s /tmp/out$$ ]
  454. Xthen
  455. X    echo "INFO: You appear to have ditroff - don't forget to use -N in"
  456. X    echo "      psrofflib's t2arg field for your printer configuration,"
  457. X    echo "      and ignore all HEADERSIZE/trofftype comments from here on"
  458. X    echo "      Quitting now - rest of normal checking irrelevant"
  459. X    echo "      If you also have CAT troff installed, alter the first"
  460. X    echo "      troff= assignment in psrofflib to point to it so that"
  461. X    echo "      testing relevant to CAT troff will be performed"
  462. X    if [ -z "`grep '^#define[     ][     ]*DIT[     ][     ]*/' defs.h`" ]
  463. X    then
  464. X    echo "ERROR: You have ditroff, but DIT is undefined!"
  465. X    exit 1
  466. X    fi
  467. X    exit 0
  468. Xfi
  469. Xif [ -s /tmp/err$$ ]
  470. Xthen
  471. X    echo "INFO: You appear to have CAT troff - pay special attention to"
  472. X    echo "      the HEADERSIZE/trofftype settings"
  473. Xfi
  474. X
  475. Xif [ '(' -s /tmp/out$$ -a -s /tmp/err$$ ')' -o \
  476. X     '(' -s /tmp/out$$ -a -s /tmp/err$$ ')' ]
  477. Xthen
  478. X    echo "WHA?  Your troff doesn't seem to be either CAT troff or ditroff."
  479. X    echo "      Good luck."
  480. Xfi
  481. X
  482. X
  483. Xfor i in $arglist -T. ''
  484. Xdo
  485. X    echo "INFO: Testing '$i' trofftype setting"
  486. X    $troff -t $i < /dev/null > /dev/null
  487. X    rc=$?
  488. X    if [ $rc = 0 ]
  489. X    then
  490. X    echo "... $i worked"
  491. X    case $i in
  492. X        -F*)
  493. X        workingtype="-F$FONTDIR/\$width/ftXX"
  494. X        ;;
  495. X        -T*)
  496. X        if [ -n "$FONTDIR" -a "$FONTDIR" != /usr/lib/font ]
  497. X        then
  498. X            echo "ERROR: FONTDIR must be /usr/lib/font with this"
  499. X            echo "       type of troff"
  500. X        fi
  501. X        workingtype="-T\$width"
  502. X        ;;
  503. X        *)
  504. X        echo "INFO: Poor you, your troff doesn't understand -T or -F."
  505. X        echo "      This means that you'll have to put all of your"
  506. X        echo "      width files directly in $FONTDIR, and you'll not"
  507. X        echo "      be able to support multiple sets of width tables"
  508. X        echo "      The OTHER possibility is that you're running"
  509. X        echo "      RISC/Ultrix who's troff cannot even read their"
  510. X        echo "      own width tables!  In this case, -F is probably"
  511. X        echo "      the correct form"
  512. X        workingtype=" "
  513. X        ;;
  514. X    esac
  515. X    break
  516. X    else
  517. X    echo "... $i didn't work"
  518. X    fi
  519. Xdone
  520. Xif [ -z "$workingtype" ]
  521. Xthen
  522. X    echo "ERROR: Oh my, your troff doesn't seem to work AT ALL!"
  523. X    echo "       It's giving me non-zero return codes when I try"
  524. X    echo "       all of the known different ways of setting width table"
  525. X    echo "       directory (including none!).  Egads.  Get Help!!!!!!!"
  526. X    echo "       (One possibility is that you have ditroff which doesn't"
  527. X    echo "       understand -t and will not work with psroff)"
  528. X    exit 1
  529. Xfi
  530. X
  531. Xif [ "$workingtype" != "$trofftype" ]
  532. Xthen
  533. X    echo "ERROR: You should have trofftype='$workingtype' in $psrofflib"
  534. X    echo "       Psroff won't work AT ALL without this fixed"
  535. Xelse
  536. X    echo "INFO: Your trofftype setting ($trofftype) appears correct"
  537. Xfi
  538. X
  539. Xif [ ! -r $FONTDIR/ftR ]
  540. Xthen
  541. X    echo "INFO: There isn't a $FONTDIR/ftR (it should be if you've installed"
  542. X    echo "      Troff on your system.  Without it, I can't test HEADERSIZE"
  543. Xelse
  544. X    hdrsize=`sed -n \
  545. X    -e 's/^#define[     ]*HEADERSIZE[     ]*\([0-9]*\).*/\1/p' defs.h`
  546. X    echo "INFO: You have HEADERSIZE defined as $hdrsize"
  547. X    bytecount=`wc -c $FONTDIR/ftR | sed -e 's/^[     ]*//g' -e 's/[     ].*//`
  548. X    case $bytecount in
  549. X    224)
  550. X        echo "INFO: You appear to have a Xenix-like troff - width tables"
  551. X        echo "      have no extraneous garbage.  Lucky you!"
  552. X        acthdr=0
  553. X        ;;
  554. X    *)
  555. X        echo "INFO: H'mm, you don't have a Xenix-like troff - Assuming"
  556. X        echo "      your troff puts a.out.h headers on width tables, I"
  557. X        echo "      will try compiling a teensy program to find out how"
  558. X        echo "      big a.out.h headers actually are...."
  559. X        cat > AUDITP.c <<\!
  560. X#include <a.out.h>
  561. X#ifdef    X_EXEC
  562. X/*    Xenix I think.... */
  563. X#define    HEADERSIZE sizeof(struct xexec)
  564. X#endif
  565. X#ifdef    F_LNNO
  566. X/*    COFF format headers */
  567. X#define    HEADERSIZE (-sizeof(struct filehdr))
  568. X#endif
  569. X#ifndef HEADERSIZE
  570. X/*    Generalized V7 or BSD - non-coff format headers */
  571. X#define    HEADERSIZE sizeof(struct exec)
  572. X#endif
  573. Xmain() {
  574. Xprintf ("%d\n", HEADERSIZE);
  575. X}
  576. X!
  577. X        rm -f AUDITP
  578. X        if [ -z "$MAKE" ]
  579. X        then
  580. X        MAKE=make
  581. X        fi
  582. X        $MAKE AUDITP > /dev/null 2>&1
  583. X        if [ ! -f AUDITP ]
  584. X        then
  585. X        echo "INFO: H'm, Wouldn't compile ..."
  586. X        #    Common for 32 bitters (Sun/Ultrix f'r instance)
  587. X        acthdr=-32
  588. X        else
  589. X        acthdr=`./AUDITP`
  590. X        fi
  591. X        rm -f AUDITP AUDITP.c
  592. X        case $acthdr in
  593. X        -*)
  594. X            echo 'INFO: The following HEADERSIZE is *purely* a guess:'
  595. X            acthdr=`echo $acthdr | sed -e 's/-//'`
  596. X            ;;
  597. X        esac
  598. X        echo "INFO: It looks like HEADERSIZE should be $acthdr"
  599. X        ;;
  600. X    esac
  601. X    if [ "$hdrsize" != "$acthdr" ]
  602. X    then
  603. X    echo "ERROR: HEADERSIZE should be set to $acthdr, not $hdrsize"
  604. X    else
  605. X    echo "INFO: HEADERSIZE appears to be set correctly to $hdrsize"
  606. X    fi
  607. Xfi
  608. X
  609. XTopts="`sed -e '/^[a-zA-Z]/!d' -e '/^troff/d' \
  610. X    -e '/^trofftype/d' -e 's/[     ].*//' $psrofflib | sort -u`"
  611. Xecho "INFO: Commencing psrofflib ($psrofflib) checking"
  612. Xif $chkinst
  613. Xthen
  614. X    msgtyp='ERROR  '
  615. X    troff2ps=$LIBDIR/troff2ps
  616. Xelse
  617. X    msgtyp='WARNING'
  618. X    troff2ps=./troff2ps
  619. Xfi
  620. X
  621. Xif [ ! -f $troff2ps ]
  622. Xthen
  623. X    echo "WARNING: Can't test drivers, because troff2ps isn't built"
  624. Xfi
  625. Xrm -f PRINTERLIST
  626. X
  627. Xfor type in $Topts
  628. Xdo
  629. X    troff="<not set>"
  630. X    trofftype="<not set>"
  631. X    width="<not set>"
  632. X    t2arg="<not set>"
  633. X    lparg="<not set>"
  634. X    ptr="<not set>"
  635. X#    If your system has no awk (or a busted one), you may have to
  636. X#    comment out the "line=`awk ... $psrofflib" lines, and uncomment
  637. X#    the sed script.  If you do, you won't be able to continue
  638. X#    psrofflib lines, so you'll have to "join" the entries in psrofflib
  639. X#    (remembering to delete the name fields in the continuation lines).
  640. X    line=`awk '
  641. X    $1 ~ /^#/ {next}
  642. X    $0 ~ /^troff/ { print $0 }
  643. X    $1 == "'$type'" {
  644. X        seen=1
  645. X        print "F='T'" substr($0, length($1) + 1)
  646. X        next
  647. X    }
  648. X    { if (seen) exit(0) }
  649. X    ' $psrofflib`
  650. X    eval "$line"
  651. X    echo "INFO: psroff -T$type settings:"
  652. X    echo "      troff      $troff"
  653. X    echo "      trofftype  $trofftype"
  654. X    echo "      width      $width"
  655. X    if [ -n "$FONTDIR" -a ! -d $FONTDIR/$width ]
  656. X    then
  657. X    echo "   * $msgtyp: FONTDIR/$width not installed yet"
  658. X    echo "              psroff -T$width won't work until you do"
  659. X    fi
  660. X    if [ ! -d widths/width${width} ]
  661. X    then
  662. X    echo "   * WARNING: no widths/width${width} directory"
  663. X    fi
  664. X    echo "      t2arg      $t2arg"
  665. X    drivertype=`echo $t2arg | sed -n -e 's/.*-T\([^     ]*\).*/\1/p'`
  666. X    printertype=`echo $t2arg | sed -n -e 's/.*-p\([^     ]*\).*/\1/p'`
  667. X    if [ -z "$drivertype" ]
  668. X    then
  669. X    echo "   * INFO   : no -T in $psrofflib t2arg - assuming ps"
  670. X    drivertype=ps
  671. X    fi
  672. X    if [ -z "$printertype" ]
  673. X    then
  674. X    printertype=$drivertype
  675. X    fi
  676. X    echo "          Driver type: $drivertype, library prefix: $printertype"
  677. X    if [ -f $troff2ps ]
  678. X    then
  679. X    $troff2ps -T$drivertype < /dev/null > /dev/null 2>&1
  680. X    if [ $? != 0 ]
  681. X    then
  682. X        echo "   * ERROR  : troff2ps driver $drivertype not" \
  683. X        "configured psroff -T$width will die"
  684. X    fi
  685. X    fi
  686. X    set +x
  687. X    echo "      lparg      $lparg"
  688. X    echo "      ptr        $ptr"
  689. X    if [ ! -r $libbase/$printertype.lib ]
  690. X    then
  691. X    echo "   * WARNING: no $libbase/$printertype.lib (no prolog)"
  692. X    fi
  693. X    if [ ! -r $libbase/$printertype.fonts ]
  694. X    then
  695. X    echo "   * ERROR  : Can't find $libbase/$printertype.fonts"
  696. X    echo "              Won't be able to give you list of fonts available"
  697. X    continue
  698. X    fi
  699. X    echo "See $printertype.fonts below for listing of fonts"
  700. X    echo $printertype >> PRINTERLIST
  701. Xdone
  702. X
  703. Xif [ -z "$printerlist" -a -s PRINTERLIST ]
  704. Xthen
  705. X    printerlist=`sort -u PRINTERLIST`
  706. Xfi
  707. Xrm -f PRINTERLIST
  708. X
  709. Xfor printertype in $printerlist
  710. Xdo
  711. X    (
  712. X    if [ -n "$FONTDIR" -a -d "$FONTDIR/$printertype" ]
  713. X    then
  714. X        ls $FONTDIR/$printertype | sed -n -e 's/^.*ft//p' | sort -u
  715. X    fi
  716. X    echo "troff2ps"
  717. X    cat $libbase/$printertype.fonts
  718. X    ) | awk '
  719. X    BEGIN {
  720. X    fontdir = "'"$FONTDIR"'"
  721. X    printertype = "'"$printertype"'"
  722. X    catfonts[""] = 0
  723. X    fonts[""] = 0
  724. X    printf("\n\nPrinter type %s.fonts\n\n", printertype);
  725. X    printf("%-4s %-20s %-25s %s\n", "Cat", "English Name", "Sequence", \
  726. X        "Flags");
  727. X    printf("Name\n\n");
  728. X    ignoring = 0
  729. X    }
  730. X    $1 == "troff2ps" {
  731. X    startlisting = 1;
  732. X    next
  733. X    }
  734. X    $1 == "normal" || $1 == "symbol" {
  735. X    ignoring = 1
  736. X    }
  737. X    $1 !~ /^[A-Za-z][A-Za-z]*/ {
  738. X    next
  739. X    }
  740. X    NF >= 1 {
  741. X    if (ignoring)
  742. X        next
  743. X    if (startlisting) {
  744. X        english = ""
  745. X        sequence = ""
  746. X        flags = ""
  747. X        name = $1
  748. X        if (NF > 1)
  749. X        english = $2
  750. X        if (NF > 2)
  751. X        sequence = $3
  752. X        if (NF > 3)
  753. X        flags = $4
  754. X        printf("%-4s %-20s %-25s %s\n", name, english, sequence, flags);
  755. X        fonts[name] = 1
  756. X    } else {
  757. X        catfonts[$1] = 1
  758. X        ftdirfound = 1
  759. X    }
  760. X    }
  761. X    END {
  762. X    if (ftdirfound) {
  763. X        for (name in fonts) {
  764. X        if (name && !catfonts[name])
  765. X            printf("  FONT %s: do not use: %s/%s/ft%s not installed\n",\
  766. X            name, fontdir, printertype, name);
  767. X        }
  768. X    }
  769. X    for (name in catfonts) {
  770. X        if (name && !fonts[name]) {
  771. X        printf("  FONT %s: do not use: %s/%s/ft%s exists, but", \
  772. X            name, fontdir, printertype, name)
  773. X        printf(" not in %s.fonts\n", printertype)
  774. X        }
  775. X    }
  776. X    }'
  777. X    if [ -n "$LJF" -a -d "$LJF" -a "$printertype" = lj ]
  778. X    then
  779. X    echo "I'm checking $printertype.fonts file for missing font"
  780. X    echo "files, please have patience"
  781. X    sed -e '/^[A-Za-z][A-Za-z]*/!d' $libbase/$printertype.fonts |
  782. X        while read troffname english sequence flags
  783. X        do
  784. X            for i in 6 7 8 9 10 11 12 14 16 18 20 22 24 28 36
  785. X        do
  786. X            suffix=
  787. X            case $flags in
  788. X            n* | b*) ;;
  789. X            p*)
  790. X                suffix=pk
  791. X                ;;
  792. X            s*)
  793. X                suffix=sfp
  794. X                ;;
  795. X            esac
  796. X            if [ -n "$suffix" -a ! -r $LJF/$troffname.$i.$suffix ]
  797. X            then
  798. X            echo "ERROR: $LJF/$troffname.$i.$suffix missing"
  799. X            fi
  800. X            flags=`echo $flags | sed -e 's/.\(.*\)/\1/'`
  801. X        done
  802. X        done
  803. X    fi
  804. Xdone
  805. END_OF_FILE
  806.   if test 12941 -ne `wc -c <'audit.S'`; then
  807.     echo shar: \"'audit.S'\" unpacked with wrong size!
  808.   fi
  809.   # end of 'audit.S'
  810. fi
  811. if test -f 'fonts.lj/S.20.pk.UU' -a "${1}" != "-c" ; then 
  812.   echo shar: Will not clobber existing file \"'fonts.lj/S.20.pk.UU'\"
  813. else
  814.   echo shar: Extracting \"'fonts.lj/S.20.pk.UU'\" \(11597 characters\)
  815.   sed "s/^X//" >'fonts.lj/S.20.pk.UU' <<'END_OF_FILE'
  816. Xtable
  817. X !"#$%&'()*+,-./0123456789:;<=>?
  818. X@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
  819. Xbegin 644 fonts.lj/S.20.pk
  820. XM]UD``4``````````!":N``0FKJ",(0```$`[4_H]WB_=/]P]SSW//<XCW//<
  821. XM\]SB/<\]SSW//<XCW//<\]SB/<\]SSW/.^+!.^/!.]3!.\:_.\$5OSNB-;T[
  822. XMH56].Y%EO#PO6[/#];D\1;@\9;<\9;8\A;4\CUM#RELSRELCS%L3S/6P/.]9
  823. XM/06#T/5STO53U/4SU5(]?U$]CWV6VUVTW?/(L+$D````6$TF^R3!C7C+PM'"
  824. XMQL;-QL/)RGA<%UP,9L%+6ZQ%Q3E,*L)<<W3%G`7)-CQYI,PE/)F$S30\J67.
  825. XM(SS)1<\R/-DET2(LZA32(3S\'371P-1-*M5-.=5-.M1-2M--6=--6M)-3`T5
  826. XMT\'/,2TD&LXB+14IS3(\]4G,,RSE:<HT/-2)R34LQ*G'-CR5P)Q4<\=<*L))
  827. XM/%7$JUM,%L;`5\%8?*R</&S<;&PM'"RXUXP0H"HE````1#DR^RV_78?6G4Y+
  828. XM#4G6?84`*<W!!''<`"G%V'UIU.2PU)UGV%OPP(\F````1#DF^R2X`2>=#=E]
  829. XM39MM;6;%B=-=!,C07131BUTCTXE=(]6(33/6ADTSV'5-0]ES35+:@DU2V\U3
  830. XMW+U2W:UBWIUBWWURWXUB`0C5(!%]4@$)U"`0K3/>O4+>S3+=0HTBW4-](]M%
  831. XM?2+:1HT3V$B-$]99C0/56XT#TUT(T#T%TYQ);6T'T]G)S=JX`2>P;"H```!$
  832. XM*2KS*1+7(4U9TU%=%37/55S5=<M97)6UQUP5Q5PUPUQ5P5QUM<E97+5US55<
  833. XM]37145TYU7U_77?5G345T5-<]57-5URUE<E;7'7!7%7#7#7%7!7'6UR5E<M7
  834. XM7-55SU-=%173G502UR%@#2T```!$-03Y%AG!TQG!H$P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?0!_S`@L&EC````+2XV_R3"?9O(
  883. XM.L/%2,;$.,C"1\G"-X>,!&;`;`-FPUI&3&2C9,=81DR$@V3*-T8\M&-SS#5&
  884. XM3,-3US4]=#38,SV3)-DR/:,4VO,3VWV^)MSUW>)-[B/>]-X][C3=XTW>--[S
  885. XMWRQPP()D````)R,[_#G9?<S85DUDH]1+32303071/%TBT%`10!'U`1]@$'WX
  886. XMWJW:W:W;W+W+V\U]+64YTV9])H?0:7QK:VT&EM%H?26&TU=]-6?45GU$:-1&
  887. XM]]5%C518U3;B?51GU$=M5';5./;42&TTIM)*;13%T3T&P]);3364U65-G-UM
  888. XM8,`X90```",<)?PCU:TM#-.WUGUVV&V&V&V'U_?7]]>-?]M-E8U^1]GC;:7:
  889. XM;:7;72-ET$=:669LT=2(L&EF````)R1*_#C*Y3U3&,S"R5<\=!P,9#G'33/3
  890. XM333334/4333333]---/TT_33]-/TTUT^)--=/C33Y%T_;3]M)])]&-&L[!S,
  891. XM/*Q<G%R<7)Q,O"S<#/G1?2;3XUTTR"I,@X3*14S:T&P0L'AG````+"@V_21U
  892. XMPWN:P(,U=65355.E-%4TMB-F%,!B-JPE%&G#43>,11-WQ9=\2?=\67;&:FQ7
  893. XME\5_EL9J;%>7Q7GVQFIL5Y?%>?;&:FQ7E\5Y]L9J;%>7Q7GVQFIL5Y?%>6QF
  894. XMP#QVU??5]M7WU?;5]]7VU??5;8.PP(-H````*2,[_3G97?G;14UU9=583465
  895. XMTEM-%K707%QL6VT%M=%:;1;X;29WTF=M-F?39FTW]7TW]'U'1]-TC3=/?4='
  896. XMTX/B`21].#C3=/?4='TX1]-U;4=6U&7WTW7WTG9M-G;2>%TFGUT6I=!K707%
  897. XMQM!:;16ETTE=1(761EV$1-NMY=G`/6D````?%R;\)*/6;3]]/VTWT^)M-]/B
  898. XM;3?3]M-]/B;3?3;3?3]L,7M!;#)K0FLR:T)J1%E%6$972%1:O1;`L&QJ````
  899. XM,RLF_"2CVVQEP7Q)M\*[;!08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R'PFR/;#;)/&/#L'=Q````+2@V_B3-
  916. XM?2P,YE3,6%R%IL9<!<5<%L-L)<)L-L%<1L!L1OML5J;&:FQ7E\5_EL9Y;%B'
  917. XMQ8^&QGA\6(?%>6QGEL5Y?%>7Q'IL5K?#>HPVN,)L"<!L&;;!<3E<-R15Q62\
  918. XM=F?(]]7VU??5]M7WU?;5]]5M@]?`97(````R+27\(]7=TP$=`!.P%+`4J7C7
  919. XMBGUGT'U'TFU&TVTVU6T7U6T6UFT/;7;'UVQMAL;7>WUVSVV&QM=\;7;078;0
  920. XM]==M%=9M)=9=-=5M1=-M5=)M==!MA<;:6EWE90$=`!9P$+`]<P```"<J)?TC
  921. XMO2K5?7;7;79J/*7`/)7`3)3!3(3"3'3"3(/#3:39]=GTV>)=CB78]MCUV.)M
  922. XM?B;7]]=ME,[`<W0````P*R;]))7:.IUG9#75=45=.4-ETY,W74@D=M1R.&U6
  923. XM%';6;Q.&UY=]=!.&V$$W?9.VV4MMD[?9.VVCMME*?9.VVCMME+;9.WV$MMD\
  924. XM;83&V#T&UTT&UST6UCTFU3U&TTU&TDUFT$V&L]MW3>T0$YU0L)]U````-"Y*
  925. XM_#C3\][TWO/>]-[SWO3>\][TWO/>]-JM3&SG)#;*945L9G.%PVDY7!:4I;6T
  926. XMM97`/`6&P#P&9L!,%5;!3!;S;"/";R;"3";Q;#/#86PDPL+"3"P?PSPV'VPD
  927. XMPF+VPCPF-L%,%E7!3`9FP#P&A<`\!96TM;6DEL%9.6PU@W;&945LIC0GSL;4
  928. XMK:]-[SWO3>\][TWO/>]-[ST@L)-V````-S`V_21VW+TB-#?0,S5\Y"-WS$,W
  929. XMC*3#?)3$C'3&?&3'?%3)?#3*?"7+?`7,?`3->TSWE-!X31=TTW5-1T35<TUW
  930. XM%-B]FMN-SWWO?<C;K9O807UT-]5$?417TT=]%(?027STM\U,!\Q<!\M<)\I,
  931. XM-\E,5\=,9\9,>,1,EY%4RH<S3,=S),YU,ST'-#+2O<9PP,)W````.35*_3@!
  932. XM?C,"1`).(P)$`DXC`D0"3B,"1`).(]Y=1,.ITCMV0UT3MU15T#J4-EQ*DS=<
  933. XM/()':ST'(X:ST6%':TT6\3AK/3EWL]-!.&M--!-WL]4[;#U$ML/4.WM-0[;#
  934. XMU3ML/42GP]0[;$U#ML/4/&P]-+?#TSQL323&P],]!L/2/1;#T4T6M-!--J/0
  935. XM34:CQ-9I.TUVA*/:9SE-UE-T`0@C1@%-0!JP(/,"1`).(P)$`DXC`D0"3B,"
  936. XM1`)#`3"PA'@````W-";_)`$CP"U6H]5X34ATU99-:%38=3V71-ID/<4TW%,]
  937. XMU#3=0SR#QT,\=<9"3&;&,_/';&,SQVQ4),9L8S/';&,SQVQ4,\=<8T/'7%1$
  938. XMQEQ$5,9,5%3%7$1DQ&PU9<)\)7;`G`65NJ>7;#:*R!R,#&/&P<5,7#PVPL>Y
  939. XMO+;"?"GD````5`U/W/0^PP#EZ````)AE3^CW775/7/8/8/8/8]-?MQ-?T
  940. XMUTV#V#UTUDU%VTVDVCVCV4V?39[<39]-D]H]H]H]L]M0R#E[````)AE3^CU=
  941. XMM-I-H]H]E-GTV>W$V?39/:/:/:/;/;75/7/8/8/8/8]-?MQ-?TUTV#V#UTUD
  942. XMU%UPL$]\````1#DG^R>WV1G!U3?$TS;&TC7)T#3+SS.'K-0FP9RT)<2,E"7&
  943. XMG&4DR8Q%),N<%B3,MX,\_+0]#)4]+&8]/$<]7!D=EP`X`!L05A`;$&`:?0``
  944. XM`$0Y*/LH&@';&@`"N:`=L:``*YH!VQH!R$U^````)AU3_#TM[SWN(][B/>XC
  945. XMWN(][B/>XSWN(][B/>XCWN(][B/>XCWN(][B/>XCWN(][B/>XCWN(][C/>XC
  946. XMWN(][B/>XCWN(][SWB"@F'\```!$.CS[.:FYFVM+.TLK>K>PN8N9=X:'=ULF
  947. XM1K)56U4EM51+>K=#6XBX4DN8N4+TNFND%;M+N?O$O(O2O8Y=>=5?%-5"734_
  948. XM331%T55<]73/2%S5E<M;!,M+%<E;)<=;1<5;9<-;A<%;I;];Q;U;Y;M<!K=L
  949. XM)K5L1K-L9K%LE:7,6%SE9=!4721$TU)=2M;XV/;:]-PL$,`RH0```"P@2?HX
  950. XMTB`0]-[VW(VJV,UD%!340D)-)#0TQ41%AE161G1V%928M+/@*M%`$"T@@#6B
  951. XM````6$T>^R/$'2/131/131/13131313131315=$@41T<U<Y,],],],],]-`]
  952. XM!-`]!-`](9;`,J,````L($GZ.-(@$.`J31.TN)25%G1V1E16A41%Q#0TTD)"
  953. XM3404%-;-BMJ-SVWO0!`M((`UI````%A-'OLCEATCT$T#T$T#T$STSTSTSTST
  954. XMSES=$042T571313131313131/131/131/2'$L&NF````+"4L_2H2UEU'THT:
  955. XMS\#-0GS$.,I%C(1WQTB,5*?$3`?"3!C`3#>TQ(E,:'3(=DR81,N"3-<?3.O-
  956. XM<4RX),F$3(=DQH=,2)3#>TP8P$P'PDI\1(C%1WQT6,A#C*0GS,#-K/C1?275
  957. XM+6"P:Z@````L)2S]*M8M5=)]&,^LW`S'),J#3(A4QW=,6(3$>DPGP$P(P4M\
  958. XM-)C$1XQD9\A$C)0HRT%\V_SD%\U"C+1(R49\A'C&28Q$M\-,",%,)\!,1Z3%
  959. XMB$QW=,B%3*@TS'),W`SZT8TGU%UB$%@)L````"HJ`P`^V+`QM0```#LP,OLP
  960. XM$MXA[63<G:44VD)=A3381%UE5=17;0:7S'N<:<'`K`Q-+(SLW(U,#&"P,;8`
  961. XM```[,#+[,,;`U,C-SLC2Q,"L#!G&FWS'EM!G7455UE1-A#784DVD%=J>UMQ!
  962. XM+>(0L%6W````.RPV^2_*R<?.Q-#"T<*M2-=]AMEME=I=I=M-M=I=M-M=M-M=
  963. XMOB3;7;]-S?$&<?3<7<XDW%W$W%W$W%W%W$W%W%W%W&VVVWVHVJU]'%T,;.RL
  964. XMD:!.N@```$0U-ODONL2WR;3+LLRQL,Z-%])M-=1=1=5-5=1=5-5=5-5=7B35
  965. XM75Z4UEUN)-9=9-9=9-9=9=9-9=9=9=9M5]2-.PT<RUR[;)NL0:!.NP```$0U
  966. XM-ODO'$NLFVR[7,T;#3C4?5;676767636767636763676XDUEZ=9-5>+53575
  967. XM357535747535747473;2?1C.L+',LLNTR;?$NJ!5O@```$0U1_DVNL2WR;3+
  968. XMLLRQL,Z-%])M-=1=1=1=5-5=5-5=5-5=7B3575Z$UEUN)-9=9-9=9-9=9-9=
  969. XM9=9=9=9M5]2-.PT<RUR[;)NL0`*_UC_8/6&@5;\```!$-4?Y-AQ+K)MLNUS-
  970. XM&PTXU'U6UEUEUEUEUDUEUDUEUDUEUN)-9>C6357BU4U5U4U5U4U5U4U5U%U%
  971. XMU%TVTGT8SK"QS+++M,FWQ``M'6/]@]8P<!+(````.S`7^QT:8=@:?HFD2E(0
  972. XML##,````+"$B^R7!?+P<;%P\?!R;RYS7SU_1/BTQ#LXATS_17/?-G+O)P<?#
  973. XMQ<;!RWP0D*_-````6$U+^SFVH]&MR;/$M\"CH:.\H*N@N8L8MHM8LWN7L6O6
  974. XMKVOVK5PUJUQ5J5QUIUR5I5RUI$S4HUS5H5SUH$T4E=%8331UTU9-5%755/37
  975. XM0UUU+B3905V9Z@VYV5XA390EUU/TUT1=55351ETU=--(7164T4H%SUH5S5HT
  976. XMS4I%RUI5R5IUQUJ5Q5JUPUK6OVKVO6L7N7LXM8MHL8N:"KH+RCH:/`M\2SR:
  977. XMW1H[8,`HS@```"<<2_LYQ-KH;:Y4W.(M%F)F&C(P/S(Z%F)FT?+<Y$VNW6VN
  978. XMTDR`.\\````G'$O[.9-)[G:>Y$H/*5A"2!VQ=25Y7RH.1)[G:>2[2>YVGN1*
  979. XM#RE80E<=L80DB5\J#D2>YVGDD[!4U0```"4C2_LYSET(SD,\Q%/+1%R5)\E#
  980. XM?BR%-\A5/)Y5T6T>-='D;171Y6T'T.1M!]#E;171Y&T>-=%M'E7(-EQ_=%Q_
  981. XM=$R'-,E53*-4S#-,Z-!<X-"7V````"PC1?P^`<("+T`@4"!`%W-`%`$P$E=P
  982. XM$4M`$4Q=3'M-B5V835%'74)6]`$$-%75-4]=1%-=55+B74927%91]L1\M7SB
  983. XMM(REC/I)R5G/E*R%K.*$O'6\]TQA5EQ2XE9-4F1<8F1-8U1-5%-=5%-`$%7U
  984. XM)-5T%=2)U9C4M\35Q`$5E0$85@$@$P%$-P%T`@4"#T`B(!R@]=D```!-1$S\
  985. XM.L*MNWU;O0FIS&MVR6NVQEOUPUPUP%Q5ODR4O$RTNDS4N$STMDT4M3TSM#U3
  986. XMLDU4L3USL//9.?/;-SW38\![LU.^1BNC0[Q**X-#NTLAMS,[M+0;<R.Z2V&V
  987. XM,CN5MAMC([E+5+4R.X6T6U,3N4M5MFN%M5MFN%MCMVN$S&Y[=<P_$[9<LR.W
  988. XM3+,O.W7*,_.W2Z&S-#N$N!M#4[=+@;,V.X2V&T-SN#M1M#@[D[,;4Y.Y.P*U
  989. XM.CNS<K<[`[R+@[%-5+(]4[0],[5-%+9,]+A,U+I,M+Q,E+Y<5<!<-<-;]<9K
  990. XMMLEK=LR:G0N]6WVZPF@-V@```"\F)OPEWNB(G>`(#.````!$%E/C/-[E@<#8
  991. XM#>$```!$%E/C/N!+G0R`H#;B````1!A3XSRZ.X6W:V:V:V:V:V:V:V>U>U][
  992. XM5[6+5[6+5[7XM/BTFT^+3YM/BTXYM(M.U9M`P#WC````1!A5\C[2[;GBT9T?
  993. XMG1G2C2C2C3?3?3?2C2?2?3?2;537;7?5?6?5C5?5?5?4C4C4C3G3^=/BG3[;
  994. XMD*@TY````$084^,^[5FUBUXYM?BU^;7XM9M?BV^+9[:+9[:+9[?WMWMWMVN&
  995. XMN&N&N&N&N&N%NC#8#?````!$%E/P/`R.!+V0``SQ````1!93\#X<Y8W@J#3R
  996. XM````1!A3\CP[I;AKAKAKAKAKAKAK=[=[?WMWMHMGMHMGMOBV^+6;7XM?FU^+
  997. XM7CFUBU[5D,@]\P```$085>,^[;G3XIT_G3G3C4C4C4?5?5?5C5?6?5?7;735
  998. XM;2?3?2?2C2?3?3?3C2C2C2G1^='BG1[;G2"@-O0```!$&%/R/K3M6;2+3CFT
  999. XM^+3YM/BTFT^+3XM7M8M7M8M7M?>U>U>V:V:V:V:V:V:V:W6X.Z#8"_4```!$
  1000. XM"57C/@`O\"@)]@```%A7`@`6VY!5^P```%A-,/LLLSWTWEWDWEWDWEW5W5WD
  1001. XMWEW5W5W<^IT:;3I=.E;;;;?:?:C8G7^@W)W8W7WGWFWVWM.GTZC1J<^K7?7?
  1002. XM7?3?7?7?7?3?7?3?7?0!`\/8"_P````O)B;\)0!:8)!5_0```%A-,/LLPS`0
  1003. XM3?7?3?7?3?7?7?7?3?7?7?6KSZG1J-.GT]YM]MY]Y]V-V=SZ#7G8C:?:?;;;
  1004. XM:ETZ73IM&IS]U=U=U=Y-Y=U=U=Y-Y=Y-Y=Y-\[-@&OX```!$.3K[.(4I_H)(
  1005. X/2@';&@A>?TA*`=L:`?7V
  1006. X`
  1007. Xend
  1008. END_OF_FILE
  1009.   if test 11597 -ne `wc -c <'fonts.lj/S.20.pk.UU'`; then
  1010.     echo shar: \"'fonts.lj/S.20.pk.UU'\" unpacked with wrong size!
  1011.   fi
  1012.   # end of 'fonts.lj/S.20.pk.UU'
  1013. fi
  1014. if test -f 'lib/lj.fonts' -a "${1}" != "-c" ; then 
  1015.   echo shar: Will not clobber existing file \"'lib/lj.fonts'\"
  1016. else
  1017.   echo shar: Extracting \"'lib/lj.fonts'\" \(3578 characters\)
  1018.   sed "s/^X//" >'lib/lj.fonts' <<'END_OF_FILE'
  1019. X#@(#)lj.fonts 2.1 90/07/18
  1020. X#    four fields:
  1021. X#
  1022. X#    troff-name english-name HPLJ-code-to-transmit flags
  1023. X#
  1024. X#    \nnn sequences are only recognized in the HPLJ-code field.
  1025. X#    Don't put in *any* extraneous spaces.
  1026. X#
  1027. X#    The source flags is a string of characters up to 15 long,
  1028. X#    where each character indicates where the font at a specific size
  1029. X#    *is*, and the point sizes go from troff's lowest to highest.
  1030. X#    The character mapping is:
  1031. X#
  1032. X#        n: non existant - the lj driver will search "near" (+/- 4
  1033. X#           points) the requested pointsize in the same font, trying
  1034. X#           to find an existing pointsize that is "close".
  1035. X#           If it can't find one, the driver will select by
  1036. X#           characteristic the font that was requested, letting
  1037. X#           the printer figure it out.  Which *will* work provided
  1038. X#           that the characteristics *here* and in the downloaded
  1039. X#           font are reasonable.
  1040. X#        b: builtin - font is selected by *characteristic*,
  1041. X#           and is either a ROM font/size, or a manually downloaded
  1042. X#           one.  I suggest that if you manually download fonts,
  1043. X#           you select fontid's > 1000.  (see below)
  1044. X#        s: there is a SFP at LIBDIR/lib/lj/<troffname>.<pointsize>.sfp
  1045. X#           where troffname is troff's name for a font.  Eg: "R".
  1046. X#           And pointsize is troff's point size.
  1047. X#        p: there is a TeX PK format font file at
  1048. X#           LIBDIR/lib/lj/<troffname>.<pointsize>.pk.
  1049. X#
  1050. X#    SFP and PK's are downloaded automatically by the LJ driver.
  1051. X#
  1052. X#    They are assigned a LJ fontid calculated by:
  1053. X#      "index of the font in this table" * 16 + "index of pointsize"
  1054. X#      (6 is 0, 7 is 1, 36 is 14.)
  1055. X#    They are selected by this fontid. (eg: it doesn't matter if the
  1056. X#    font descriptor in a SFP has the correct characteristics or not)
  1057. X#
  1058. X#    If the source string is too short or omitted, the missing point
  1059. X#    sizes are assumed "non-existent", unless DOWNLOAD is undefined,
  1060. X#    in which case they're assumed builtin.
  1061. X#
  1062. X#                         +----------------------------- Symbol set
  1063. X#                         |      +---------------------- 0=fixed, 1=proport
  1064. X#                         |      | +-------------------- 0=upright, 1=italics
  1065. X#                         |      | |  +----------------- stroke weight -7...7
  1066. X#                         |      | |  |  +-------------- Typeface
  1067. X#                         |      | |  |  |
  1068. X#                         |      | |  |  |  +----------- source flags...
  1069. X#                         |      | |  |  |  |
  1070. X#                         |      | |  |  |  v
  1071. X#                         |      | |  |  |  678910 14 20 28
  1072. X#                         |      | |  |  |       11 16 22 36
  1073. X#                         |      | |  |  |        12 18 24
  1074. X#                         |      | |  |  |  |||||||||||||||
  1075. X#                         v      v v  v  v  vvvvvvvvvvvvvvv
  1076. XR  Times-Roman      \033(8U\033(s1p0s00b05T nnnnpnnnnnnnnnn
  1077. XI  Times-Italic     \033(8U\033(s1p1s-3b05T nnnnpnnnnnnnnnn
  1078. XB  Times-Bold       \033(8U\033(s1p0s03b05T nnnnpnnnnnnnnnn
  1079. XS  Symbol           \033(8M\033(s1p0s00b05T ppppppppppppppp
  1080. XBI Times-BoldItalic \033(8U\033(s1p1s03b05T nnnnnnnnnnnnnnn
  1081. XC  Courier          \033(8U\033(s0p0s00b03T nnnnbnbnnnnnnnn
  1082. XCI Courier-Italic   \033(8U\033(s0p1s-3b03T nnnnbnbnnnnnnnn
  1083. XCB Courier-Bold     \033(8U\033(s0p0s03b03T nnnnbnbnnnnnnnn
  1084. XL  LinePrinter      \033(8U\033(s0p0s00b00T nnnnnnnnnnnnnnn
  1085. XLI LinePrinter-Ital \033(8U\033(s0p1s-3b00T nnnnnnnnnnnnnnn
  1086. XLB LinePrinter-Bold \033(8U\033(s0p0s03b00T nnnnnnnnnnnnnnn
  1087. XH  Helvetica-Roman  \033(8U\033(s1p0s00b04T nnnnpnnnnnnnnnn
  1088. XHI Helvetica-Italic \033(8U\033(s1p1s-3b04T nnnnpnnnnnnnnnn
  1089. XHB Helvetica-Bold   \033(8U\033(s1p0s03b04T nnnnnnnnnnnnnnn
  1090. END_OF_FILE
  1091.   if test 3578 -ne `wc -c <'lib/lj.fonts'`; then
  1092.     echo shar: \"'lib/lj.fonts'\" unpacked with wrong size!
  1093.   fi
  1094.   # end of 'lib/lj.fonts'
  1095. fi
  1096. if test -f 'lib/ps.lib' -a "${1}" != "-c" ; then 
  1097.   echo shar: Will not clobber existing file \"'lib/ps.lib'\"
  1098. else
  1099.   echo shar: Extracting \"'lib/ps.lib'\" \(12499 characters\)
  1100.   sed "s/^X//" >'lib/ps.lib' <<'END_OF_FILE'
  1101. X%    Copyright 1985, 1986, 1987, 1988 Chris Lewis
  1102. X%        All Rights Reserved
  1103. X%
  1104. X%    Permission to copy and further distribute is freely given provided
  1105. X%    this copyright notice remains intact and that this software is not
  1106. X%    sold for profit.
  1107. X%
  1108. X%    Project:    Generic Troff drivers
  1109. X%    Module:        ps.lib
  1110. X%    Author:     Chris Lewis
  1111. X%    Specs:        Predefinitions for PostScript
  1112. X%ident  @(#)ps.lib: 2.11 Copyright 91/03/28 19:25:44 Chris Lewis"
  1113. X
  1114. X/Y { 3 1 roll dup /CurY exch def moveto show } bind def
  1115. X/X { exch CurY moveto show } bind def
  1116. X/hits 0 def
  1117. X/misses 0 def
  1118. X/pagecount 0 def
  1119. X
  1120. X%    Are we display postscript?
  1121. X/DPS? systemdict /viewclip known def
  1122. X
  1123. X/drawfraction {
  1124. X    /denominator exch def
  1125. X    /numerator exch def
  1126. X    /origY exch def
  1127. X    /origX exch def
  1128. X    origX curPoints 4.7 div add origY moveto
  1129. X    (/) show
  1130. X    curFont findfont curPoints .5 mul cvi scalefont setfont
  1131. X    origX origY curPoints 3 div add moveto
  1132. X    numerator show
  1133. X    origX curPoints 2.5 div add origY moveto
  1134. X    denominator show
  1135. X    curFont findfont curPoints scalefont setfont
  1136. X    origX origY moveto
  1137. X} def
  1138. X
  1139. X/mySetLineWidth {
  1140. X    curPoints 3 72 div mul setlinewidth
  1141. X} def
  1142. X
  1143. X/do12 {
  1144. X    (1) (2) drawfraction
  1145. X} def
  1146. X
  1147. X/do14 {
  1148. X    (1) (4) drawfraction
  1149. X} def
  1150. X
  1151. X/do34 {
  1152. X    (3) (4) drawfraction
  1153. X} def
  1154. X
  1155. X/doff {
  1156. X    moveto
  1157. X    (f) show curPoints 20 div neg 0 rmoveto (f) show
  1158. X} def
  1159. X
  1160. X/doFi {
  1161. X    moveto
  1162. X    (f) show curPoints 20 div neg 0 rmoveto (\256) show
  1163. X} def
  1164. X
  1165. X/doFl {
  1166. X    moveto
  1167. X    (f) show curPoints 20 div neg 0 rmoveto (\257) show
  1168. X} def
  1169. X
  1170. X%    This should be sort of a font-caching mechanism - eg:
  1171. X%    remember each font/point combination requested, and
  1172. X%    if the setting is not already known, *then* do the findfont/scalefont.
  1173. X%    Otherwise, simply retrieve it.
  1174. X%    However, even with simply recalculating the font each time, it
  1175. X%    isn't *that* slow.  Eg: 20 seconds or so for *very* "font-changy"
  1176. X%    pages.
  1177. X%
  1178. X%    Trial font cache - I can't think in Polish... ;-)
  1179. X/SetFont {
  1180. X    /curPoints exch def
  1181. X    /curFont exch def
  1182. X    %    Concatenate the curFont string with the curPoints to create
  1183. X    %    a new name and assign to cF
  1184. X
  1185. X    /cF 50 string def
  1186. X
  1187. X    cF 0
  1188. X        cF curFont cF cvs        % cF 0 string "curFont"
  1189. X        length dup            % cF 0 "curFont\0\0..." N N
  1190. X        curPoints 10 string cvs    % cF 0 "curFont\0\0..." N N "points"
  1191. X        dup length            % cF 0 "curFont\0\0..." N N "points" M
  1192. X        3 -1 roll add        % cF 0 "curFont\0\0..." N "points" M+N
  1193. X        4 1 roll            % cF 0 M+N "curFont\0\0..." N "points"
  1194. X        putinterval            % cF 0 M+N    (cF <- "curFontpoints")
  1195. X    getinterval                % "curFontpoints"
  1196. X
  1197. X    /cF exch def
  1198. X    cF
  1199. X    cvn                    % /curFontpoints
  1200. X
  1201. X    where {
  1202. X    /hits hits 1 add def
  1203. X    pop
  1204. X    } {
  1205. X    /misses misses 1 add def
  1206. X    cF curFont findfont curPoints scalefont def
  1207. X    } ifelse
  1208. X    cF cvn load setfont
  1209. X} def
  1210. X
  1211. X/metrics {
  1212. X    /psize 16 def
  1213. X    /Times-Roman psize SetFont
  1214. X    /charcount exch def
  1215. X    /curpos 720 def
  1216. X    /xpos 72 def
  1217. X    xpos curpos (Execution Summary:) Y
  1218. X    /curpos curpos psize sub def
  1219. X    xpos 36 add curpos (Font cache hits: )Y
  1220. X    hits (         ) cvs show
  1221. X    /curpos curpos psize sub def
  1222. X    xpos 36 add curpos (Font cache misses: )Y
  1223. X    misses (         ) cvs show
  1224. X    /curpos curpos psize sub def
  1225. X    xpos 36 add curpos (Character count: )Y
  1226. X    charcount (        ) cvs show
  1227. X    /curpos curpos psize sub def
  1228. X    xpos 36 add curpos (Page count: )Y
  1229. X    pagecount (        ) cvs show
  1230. X    /curpos curpos psize sub def
  1231. X    xpos 36 add curpos (Execution time (seconds): )Y
  1232. X    usertime btime sub 0.001 mul (          ) cvs show
  1233. X    showpage
  1234. X} def
  1235. X
  1236. X/docircle {
  1237. X    /origY exch def
  1238. X    /origX exch def
  1239. X    /radius curPoints 3 div def
  1240. X    newpath origX radius add origY radius add radius 0 360 arc
  1241. X    mySetLineWidth
  1242. X    stroke
  1243. X    origX origY moveto
  1244. X} def
  1245. X
  1246. X/doru {
  1247. X    moveto
  1248. X    0 curPoints 5 div rmoveto (_) show
  1249. X} def
  1250. X
  1251. X/do34em {
  1252. X    /origY exch def
  1253. X    /origX exch def
  1254. X    /emheight curPoints .23 mul def
  1255. X    newpath
  1256. X    origX origY emheight add moveto
  1257. X    origX curPoints .75 mul add origY emheight add lineto
  1258. X    mySetLineWidth
  1259. X    stroke
  1260. X    origX origY moveto
  1261. X} def
  1262. X
  1263. X/dosq {
  1264. X    /origY exch def
  1265. X    /origX exch def
  1266. X    /L curPoints .8 mul def
  1267. X    newpath
  1268. X    origX origY moveto
  1269. X    origX origY L add lineto
  1270. X    origX L add origY L add lineto
  1271. X    origX L add origY lineto
  1272. X    closepath
  1273. X    mySetLineWidth
  1274. X    stroke
  1275. X    origX origY moveto
  1276. X} def
  1277. X
  1278. X/dobox {
  1279. X    /origY exch def
  1280. X    /origX exch def
  1281. X    /L curPoints def
  1282. X    newpath
  1283. X    origX origY moveto
  1284. X    origX origY L add lineto
  1285. X    origX L add origY L add lineto
  1286. X    origX L add origY lineto
  1287. X    closepath
  1288. X    1 setlinewidth
  1289. X    stroke
  1290. X    origX origY moveto
  1291. X} def
  1292. X
  1293. X
  1294. X/fourpops {
  1295. X    4 {pop} repeat
  1296. X} def
  1297. X
  1298. X%    These are macros so that they can be redefined.
  1299. X%    print current page.
  1300. X/ShowPage {
  1301. X    DPS? {            % wait for input on page break.
  1302. X    (Select other window and hit enter to continue...) waitprompt
  1303. X    } if
  1304. X
  1305. X    showpage
  1306. X    /pagecount pagecount 1 add def
  1307. X} def
  1308. X
  1309. X/waitprompt {
  1310. X    /Times-Bold findfont 20 scalefont setfont
  1311. X    0 0 moveto show    % prompt
  1312. X    (%stdin) (r) file    % open stdin for reading
  1313. X    20 string readline    % read a line into the string
  1314. X            % stack contains filled substring and
  1315. X            % boolean indicating whether reached EOF
  1316. X    pop pop
  1317. X} def
  1318. X
  1319. X%    Emitted at beginning of page.
  1320. X/StartPage {
  1321. X    Form
  1322. X} def
  1323. X
  1324. X%    If you want to define a Bell System Logo, go ahead.  This
  1325. X%    one draws an animal (ferret) face
  1326. X%    Object should be scaled off of curPoints, with origX,origY
  1327. X%    lower left coordinates.
  1328. X/BellSymbol {
  1329. X    /origY exch def
  1330. X    /origX exch def
  1331. X    /TEMPSAVE save def
  1332. X
  1333. X    /Radius curPoints 3 div def    % Face Radius
  1334. X    /HRadius Radius 2 div def    % Half Face Radius
  1335. X    /NRadius Radius 6 div def    % Nose Radius
  1336. X    /ERadius Radius 8 div def    % Eye Radius
  1337. X    /EarRadius Radius 3 div def    % Ear Radius
  1338. X    /FaceType (Ferret) def
  1339. X
  1340. X    /MRadius Radius 4 div def    % Mask corner radius
  1341. X    /TopMask Radius .7 mul def    % XCent & YCent max delta
  1342. X    /BotMask NRadius 1.1 mul def % YCent min delta
  1343. X
  1344. X    /XCent origX Radius add def
  1345. X    /YCent origY Radius add def
  1346. X
  1347. X    newpath
  1348. X    %    Main face
  1349. X    XCent YCent Radius 0 360 arc mySetLineWidth stroke
  1350. X    %    Nose
  1351. X    XCent YCent NRadius 0 360 arc fill
  1352. X    %    Left Ear
  1353. X    XCent Radius 45 sin mul sub
  1354. X    YCent Radius 45 sin mul add EarRadius 20 250 arc mySetLineWidth stroke
  1355. X    %    Right Ear
  1356. X    XCent Radius 45 sin mul add
  1357. X    YCent Radius 45 sin mul add EarRadius -70 160 arc mySetLineWidth stroke
  1358. X    %    Cleft
  1359. X    XCent YCent NRadius sub moveto
  1360. X    XCent YCent HRadius sub lineto
  1361. X    mySetLineWidth stroke
  1362. X
  1363. X    %    Mouth
  1364. X    XCent HRadius 45 sin mul sub YCent HRadius 45 sin mul sub moveto
  1365. X    XCent HRadius 30 sin mul sub YCent HRadius sub lineto
  1366. X    XCent HRadius 30 sin mul add YCent HRadius sub lineto
  1367. X    XCent HRadius 45 sin mul add YCent HRadius 45 sin mul sub lineto
  1368. X    mySetLineWidth stroke
  1369. X
  1370. X    FaceType (Ferret) eq {
  1371. X    %    Mask
  1372. X    .6 setgray
  1373. X    XCent TopMask sub YCent BotMask add YCent TopMask add add 2 div moveto
  1374. X
  1375. X    XCent TopMask sub YCent TopMask add
  1376. X        XCent TopMask add YCent TopMask add
  1377. X        MRadius arcto fourpops
  1378. X    XCent TopMask add YCent TopMask add
  1379. X        XCent TopMask add YCent BotMask add
  1380. X        MRadius arcto fourpops
  1381. X    XCent TopMask add YCent BotMask add
  1382. X        XCent TopMask sub YCent BotMask add
  1383. X        MRadius arcto fourpops
  1384. X    XCent TopMask sub YCent BotMask add
  1385. X        XCent TopMask sub YCent TopMask add
  1386. X        MRadius arcto fourpops
  1387. X    fill
  1388. X
  1389. X    0 setgray
  1390. X    } if
  1391. X
  1392. X    %    Eyes
  1393. X    XCent HRadius add YCent HRadius add ERadius 0 360 arc fill
  1394. X    XCent HRadius sub YCent HRadius add ERadius 0 360 arc fill
  1395. X    TEMPSAVE restore
  1396. X    origX origY moveto
  1397. X} def
  1398. X
  1399. X%    bracket building font
  1400. X%
  1401. X%
  1402. X% Michael Rourke, University of N.S.W., Australia
  1403. X%
  1404. X/BracketFontDict 9 dict def /$workingdict 10 dict def
  1405. XBracketFontDict begin
  1406. X/FontType 3 def
  1407. X/FontName (Bracket) cvn def
  1408. X/FontMatrix [ 0.001 0 0 0.001 0 0] def
  1409. X/FontBBox [ -50 -250 1000 1000 ] def
  1410. X/Encoding 256 array def 0 1 255 { Encoding exch /.notdef put } for
  1411. XEncoding
  1412. Xdup 65 /Cbv put    %A
  1413. Xdup 66 /Clt put    %B
  1414. Xdup 67 /Clk put    %C
  1415. Xdup 68 /Clb put    %D
  1416. Xdup 69 /Crt put    %E
  1417. Xdup 70 /Crk put    %F
  1418. Xdup 71 /Crb put    %G
  1419. Xdup 72 /Clc put    %H
  1420. Xdup 73 /Clf put    %I
  1421. Xdup 74 /Crc put    %J
  1422. Xdup 75 /Crf put    %K
  1423. Xdup 76 /Cbr put    %L
  1424. Xdup 77 /Crn put    %M
  1425. Xdup 78 /Cci put    %N
  1426. Xdup 79 /Cru put    %O
  1427. Xdup 81 /Cr1 put    %Q
  1428. Xdup 82 /Cr2 put    %R
  1429. Xpop
  1430. X/CharProcs 24 dict dup begin
  1431. X/setC { 0 -50 -250 500 1000 setcachedevice} def
  1432. X/C.bv {220 -250 moveto 0 1000 rlineto
  1433. X60 0 rlineto 0 -1000 rlineto fill } def
  1434. X/C.barc { 750 moveto 180 0 rlineto 0 -60 rlineto -180 0 rlineto fill } def
  1435. X/C.barf { -250 moveto 180 0 rlineto 0 60 rlineto -180 0 rlineto fill } def
  1436. X/C.setl {dup dtransform exch round exch idtransform pop setlinewidth } def
  1437. X/Cbv {
  1438. X300 setC
  1439. XC.bv
  1440. X} def
  1441. X/Clk {
  1442. X300 setC
  1443. X  1 setlinewidth  220 -250 moveto  0 400 rlineto  0 50 -50 100 -100 100
  1444. X    rcurveto
  1445. X    50 0 100 50 100 100 rcurveto  0 400 rlineto  60 0 rlineto  0 -400 rlineto
  1446. X    0 -50 -50 -100 -100 -100 rcurveto  50 0 100 -50 100 -100 rcurveto
  1447. X    0 -400 rlineto  closepath fill
  1448. X} def
  1449. X/Crk {
  1450. X300 setC
  1451. X  1 setlinewidth  220 -250 moveto  0 400 rlineto  0 50 50 100 100 100 rcurveto
  1452. X  -50 0 -100 50 -100 100 rcurveto  0 400 rlineto  60 0 rlineto  0 -400 rlineto
  1453. X  0 -50 50 -100 100 -100 rcurveto  -50 0 -100 -50 -100 -100 rcurveto
  1454. X  0 -400 rlineto  fill
  1455. X} def
  1456. X
  1457. X%    Fixes from Henry McGilton of Sun.  Thanks!
  1458. X%    Previous version didn't work with Pageview.
  1459. X/C.brk.end { 300 setC 1 setlinewidth moveto rcurveto
  1460. X         rlineto rlineto rlineto rcurveto fill } def
  1461. X/Clt {
  1462. X       0 150 50 210 140 250
  1463. X       0 730  60 0  0 -750
  1464. X    -150 0 -200 -100 -200 -250
  1465. X     420 750 C.brk.end
  1466. X} def
  1467. X/Clb {
  1468. X       0 -150 50 -250 200 -250
  1469. X       0 -750  -60 0  0 730
  1470. X     -90 40 -140 100 -140 250
  1471. X     420 -230 C.brk.end
  1472. X} def
  1473. X/Crt {
  1474. X     0 150 -50 250 -200 250
  1475. X     0 750  60 0  0 -730
  1476. X    90 -40 140 -100 140 -250
  1477. X    80 730 C.brk.end
  1478. X} def
  1479. X/Crb {
  1480. X      0 -150 -50 -210 -140 -250
  1481. X      0 -730  -60 0  0 750
  1482. X    150 0 200 100 200 250
  1483. X     80 -250 C.brk.end
  1484. X} def
  1485. X%    end fixes.
  1486. X
  1487. X/Clc {
  1488. X300 setC
  1489. X  C.bv   280   C.barc
  1490. X} def
  1491. X/Clf {
  1492. X300 setC
  1493. X  C.bv 280 C.barf
  1494. X} def
  1495. X/Crc {
  1496. X300 setC
  1497. X  C.bv 40 C.barc
  1498. X} def
  1499. X/Crf {
  1500. X300 setC
  1501. X  C.bv 40 C.barf
  1502. X} def
  1503. X/Cbr {
  1504. X0 0 -50 -250 0 1000 setcachedevice
  1505. X  40 C.setl  0 -250 moveto  0 1000 rlineto  stroke
  1506. X} def
  1507. X/Cru {
  1508. X0 0 -50 -250 1000 0 setcachedevice
  1509. X  40 C.setl  0 -250 moveto 500 0 rlineto stroke
  1510. X} def
  1511. X/Crn {
  1512. X300 setC
  1513. X  40 C.setl  0 895 moveto  500 0 rlineto  stroke
  1514. X} def
  1515. X/Cci {
  1516. X600 0 -50 -250 700 1000 setcachedevice
  1517. X  40 C.setl  400 250   300   0 360 arc   stroke
  1518. X} def
  1519. X/Cr1 {
  1520. X800 0 -50 -250 800 1000 setcachedevice
  1521. X  40 C.setl  0 setlinejoin  700 180 moveto -650 currentlinewidth add 0
  1522. X  rlineto 200 -200 rlineto  50 360 moveto 650 currentlinewidth sub 0 rlineto
  1523. X  -200 200 rlineto  stroke
  1524. X} def
  1525. X/Cr2 {
  1526. X800 0 -50 -250 800 1000 setcachedevice
  1527. X  40 C.setl  2 setlinejoin  217 18 moveto    -150 150 rlineto 150 150 rlineto
  1528. X  -150 -150 rlineto  633 0 rlineto  50 360 moveto  633 0 rlineto  -150 150
  1529. X  rlineto 150 -150 rlineto -150 -150 rlineto  stroke
  1530. X} def
  1531. Xend def
  1532. X/BuildChar
  1533. X{
  1534. X    $workingdict begin
  1535. X    /charcode exch def
  1536. X    /fontdict exch def
  1537. X    fontdict /CharProcs get begin
  1538. X    fontdict /Encoding get
  1539. X    charcode get load
  1540. X    gsave
  1541. X    0 setlinecap 0 setgray newpath
  1542. X    exec
  1543. X    grestore
  1544. X    end end
  1545. X} def end
  1546. X/BracketFont BracketFontDict definefont pop
  1547. X
  1548. X/Ellipse {
  1549. X    /Yaxis exch 2 div def
  1550. X    /Xaxis exch 2 div def
  1551. X    currentpoint exch Xaxis add exch
  1552. X    /savematrix matrix currentmatrix def
  1553. X    translate
  1554. X    Xaxis Yaxis scale
  1555. X    1 0 moveto
  1556. X    0 0 1 0 360 arc
  1557. X    savematrix setmatrix
  1558. X    %currentpoint exch Xaxis 2 mul add exch moveto
  1559. X} bind def
  1560. X
  1561. X/Arc {
  1562. X    /eY exch def
  1563. X    /eX exch def
  1564. X    /cY exch def
  1565. X    /cX exch def
  1566. X    currentpoint cY add exch cX add exch    % center x y
  1567. X    cY dup mul cX dup mul add sqrt % radius
  1568. X    cY neg cX neg atan    % ang1
  1569. X    eY eX atan        % ang2
  1570. X%    5 copy
  1571. X%    (                    ) cvs print
  1572. X%    ( ) print
  1573. X%    (                    ) cvs print
  1574. X%    ( ) print
  1575. X%    (                    ) cvs print
  1576. X%    ( ) print
  1577. X%    (                    ) cvs print
  1578. X%    ( ) print
  1579. X%    (                    ) cvs print
  1580. X    arc
  1581. X} bind def
  1582. X
  1583. X/dofill {
  1584. X    currentgray exch setgray fill setgray
  1585. X} bind def
  1586. X
  1587. X/dost{
  1588. X    currentlinewidth exch setlinewidth stroke setlinewidth
  1589. X} bind def
  1590. X
  1591. X%    This macro is invoked by ShowPage to display the current form.
  1592. X%    Usually redefined to point at a form loaded by an include
  1593. X%    directive.  Redefinition triggered by .sR O<formname> troff
  1594. X%    directive.
  1595. X%    Global default form (usually redefined top of each page anyways)
  1596. X/Form {} def
  1597. X%    This is a convenient place for putting your extra inclusions.
  1598. X%    Eg: this would load conf.ps (from current directory or LIBDIR)
  1599. X%    and insert it into the end of the prolog.
  1600. X%   This loads the confidential form.
  1601. X%%%include confid
  1602. X%%%include lethead
  1603. END_OF_FILE
  1604.   if test 12499 -ne `wc -c <'lib/ps.lib'`; then
  1605.     echo shar: \"'lib/ps.lib'\" unpacked with wrong size!
  1606.   fi
  1607.   # end of 'lib/ps.lib'
  1608. fi
  1609. echo shar: End of archive 8 \(of 19\).
  1610. cp /dev/null ark8isdone
  1611. MISSING=""
  1612. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ; do
  1613.     if test ! -f ark${I}isdone ; then
  1614.     MISSING="${MISSING} ${I}"
  1615.     fi
  1616. done
  1617. if test "${MISSING}" = "" ; then
  1618.     echo You have unpacked all 19 archives.
  1619.     echo "Read the README to get started with psroff installation"
  1620.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1621. else
  1622.     echo You still must unpack the following archives:
  1623.     echo "        " ${MISSING}
  1624. fi
  1625. exit 0
  1626.  
  1627. exit 0 # Just in case...
  1628.